<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>7天未上课页面</title>
<meta name="renderer" content="webkit">	
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
<meta name="apple-mobile-web-app-status-bar-style" content="black">	
<meta name="apple-mobile-web-app-capable" content="yes">	
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/table.css">
</head>
<body>
	<div class="content-head">悦宝园会员管理系统</div>
	<div class="content-main">
		<div class="side-nav" ms-controller="navBar">
			<ul class="nav-item">
				<li><a href="main.html" class="nav-item-front nav-item-add">首页</a></li>
				<li ms-for="el in @navTitleArr">
					<a href="javascript:;" class="nav-item-front">{{el.par}}</a>
					<dl class="nav-item-child">
						<dd ms-for="($index, ex) in el.child"><a ms-attr='{href: el.href[$index]}'>{{ex}}</a></dd>
					</dl>
				</li>
			</ul>
		</div>
		<div class="content bg-gray">
			<div class="tab-content">
				<div class="tab-item">
					<div class="sub-main">
						<p class="sub-title"><i>7天未上课</i></p>
						<div class="search-area">
							<div class="search-block">
								<span class="search-name">宝宝姓名：</span>
								<div class="search-input"><input type="text" maxlength="20"></div>
							</div>
							<div class="search-block"><a href="javascript:;" class="search-btn">搜索</a></div>
						</div>
						<div class="table-area">
							<div class="table-head">
								<span class="col-30">宝宝姓名</span>
								<span class="col-30">出生日期</span>
								<span class="col-40">最近约课</span>
							</div>
							<div class="table-body" ms-controller="main">
								<div class="table-line" ms-for="el in searchData">
									<div class="col-padding col-border col-inline col-center col-30">{{el.nickName ? el.name + "(" + el.nickName + ")" : el.name}}</div>
									<div class="col-padding col-border col-inline col-center col-30">{{el.birthday}}</div>
									<div class="col-padding col-border col-inline col-center col-40">{{el.passClass[el.passClass.length-1].date + "【" + el.passClass[el.passClass.length-1].classFullName+ "】"}}</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
<script src="js/jq.js"></script>
<script src="js/avalon.js"></script>
<script src="js/main.js"></script>
<script type="text/javascript">
	var allData = baseFunc.getStorageData("member"); 
	var searchArr = [];
	var searchData = (function() {
		for (var i = 0; i < allData.length; i++) {
			if (allData[i].passClass) {
				var latestClass = allData[i].passClass[allData[i].passClass.length - 1],
					latestClassTime = latestClass.date,
					day2 = new Date();
	    		day2.setTime(day2.getTime());
	    		var nowDate = day2.getFullYear() + "-" + (day2.getMonth()+1) + "-" + day2.getDate(),
					diffDay = baseFunc.dateDiff(latestClassTime, nowDate);
				if (diffDay > 7) {
					searchArr.push(allData[i]);
				};
			};
		}
		return searchArr;
	})();
	var vm = avalon.define({
		$id: "main",
		searchData: searchArr
	});
</script>
</body>
</html>